package com.ibeetl.codestory.rule.method;

import com.ibeetl.codestory.core.action.MethodInvokeAction;
import com.ibeetl.codestory.core.ast.Ast;
import com.ibeetl.codestory.core.ctx.Context;
import com.ibeetl.codestory.core.issue.Issue;
import com.ibeetl.codestory.core.match.ExactMethodMatcher;
import com.ibeetl.codestory.core.match.Matcher;

public class TestAction  extends MethodInvokeAction {
	@Override
	public void methodInvoke(Ast ast, Context ctx) {
		ctx.log(getIssue(ast));
	}

	@Override
	public Matcher acceptMatcher() {
		return new ExactMethodMatcher("java.lang.Thread","stop");
	}

	protected Issue getIssue(Ast ast){
		Issue issue = new Issue();
		issue.setMessage("禁止调用此方法 ");
		return issue;
	}
}
